using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.Text;
using DuMez.DAL;

public class SM : IDisposable
{
    #region Fields

    private int _SosyalMedyaId;
    private string _SosyalMedyaAdi;
    private string _SMLink;
    private int _MezunId;

    #endregion

    #region
    public int SosyalMedyaId
    {
        get { return _SosyalMedyaId; }
        set { _SosyalMedyaId = value; }
    }

    public string SosyalMedyaAdi
    {
        get { return _SosyalMedyaAdi; }
        set { _SosyalMedyaAdi = value; }
    }

    public string SMLink
    {
        get { return _SMLink; }
        set { _SMLink = value; }
    }


    public int MezunId
    {
        get { return _MezunId; }
        set { _MezunId = value; }
    }
    #endregion

    #region Constructor
    public SM()
    {

    }


    #endregion

    #region IDisposable Members
    public void Dispose()
    {

    }
    #endregion

    #region Methods

    public bool SMHesapEkle(int MezunID, SM sm)
    {
        return SqlUtility.ExecuteNonQuery("dbo.DUMEZ_SM_HESAP_EKLE '" + sm.SosyalMedyaAdi + "','" + sm.SMLink + "'," + MezunID + "");
    }

    public bool SMHesapSil(int SMID)
    {
        return SqlUtility.ExecuteNonQuery("dbo.DUMEZ_SM_HESAP_SIL " + SMID + "");
    }

    public bool SMHesapGuncelle(SM sm)
    {
        return SqlUtility.ExecuteNonQuery("dbo.DUMEZ_SM_HESAP_GUNCELLE '" + sm.SosyalMedyaAdi + "','" + sm.SMLink + "'," + sm.SosyalMedyaId + "");
    }

    public DataTable SMSpecificButunHesaplariGetir(int MezunID)
    {
        return SqlUtility.ExecuteDataTable("dbo.DUMEZ_SM_SPECIFIC_BUTUN_HESAP_SELECT " + MezunID + "");
    }


    #endregion
}
